﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BeanboxSoftware.BeanProxy.Recording
{
  public class ExpectedReturn
  {
    protected ExpectedReturn() { }

    protected ExpectedCallAccess _parent;
    protected Func<object[], object> _thenAction;
    public Func<object[], object> Then
    {
      get
      {
        return _thenAction;
      }
      set
      {
        _parent.MethodConfig.IsReal = false;
        _thenAction = value;
      }
    }
  }

  public class ExpectedReturnAccess : ExpectedReturn
  {
    public ExpectedReturnAccess(ExpectedCallAccess parent)
    {
      _parent = parent;
    }

    public MulticastDelegate Callback { get { return (MulticastDelegate)((object)_thenAction); } }
  }
}
